Method and apparatus for assigning ipv6 link state identifiers

ABSTRACT

In one embodiment, a link state advertisement is generated. A first value and a second value are read from the link state advertisement. The first value and the second value are combined to create a combined value. The combined value is input to a hash algorithm that performs a hash function on the combined value to produce a resulting value. The resulting value is used as a link state identifier of the link state advertisement.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 11/410,416 titled “Method and Apparatus for Assigning IPV6 Link State Identifiers”, which was filed on Apr. 24, 2006 by Paul William Wells, the contents of which are incorporated by reference herein in their entirety.

TECHNICAL FIELD

This invention relates to routing systems. Still more particularly, this invention relates to link state advertisements transmitted by routing systems. Still more particularly, this invention relates to a manner in which a link state identifier is generated for a link state advertisement by a routing system.

BACKGROUND

In a router system operating using an Open Shortest Path First (OSPF) protocol supporting Internet Protocol version 6 (Ipv6), type 3, 5, and 7 link state advertisements are used to determine connections between router systems in the network for use in determining transmission paths for data transmitted between the router systems. A router system stores link state advertisements received from other router systems. The stored link state advertisements are then used to determine the paths used for transmitting data to other routing systems.

In many prior art systems, a counter is used to provide the link state identifier for the link state advertisements. The use of a counter to generate the link state identifiers can cause a problem when a routing system has a planned or unplanned restart. It is a problem because the counter resets to zero and the link state advertisements sent may not be in the same order and/or may cause other problems when stored in the databases of other routing systems. Thus, there is a need in the art for a new manner of assigning link state identifiers to prevent the problem of duplicate and/or invalid link state advertisements being stored in a database of other routing systems.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other advantage and features of this invention are described in the following Detailed Description and are shown in the following drawings:

FIG. 1 illustrating a diagram of a network that includes routing systems that generate link state identifiers in accordance with the present invention;

FIG. 2 illustrating a block diagram of a routing system that generates link state identifiers in accordance with the present invention; and

FIG. 3 illustrating a flow diagram of a process for generating a link state advertisement in accordance with the present invention.

DETAILED DESCRIPTION

This invention relates to providing a system in a routing operating system that generates link state identifiers for a link state advertisement used in Open Shortest Path First (OSPF) protocol. In the following disclosure, the same reference numeral is used for a component shown in different figures.

FIG. 1 illustrates a network 100 including router systems 120-125 that operate the OSPF protocol supporting Internet Protocol version 6 (Ipv6) in a preferred embodiment of this invention. One skilled in the art will recognize that this invention may apply to any system in which OSPF protocol is used. Router systems 120-125 are connected via communication paths 130-136. One skilled in the art will recognize that the number of router systems and communication paths are arbitrary and the exact configuration of a network is left to those skilled in the art designing the network.

In network 100, some routers are directly connected, such as router system 120 being directly connected to router system 121 via communication path 130. While other router systems may be indirectly connected, such as router systems 120 and 122 which are connected through router system 121 via paths 130 and 135 or through router system 123 via paths 131 and 136. To determine the path for transmitting data between two routers the OSPF protocol is used. In OSPF, each router system 120-125 transmits link state advertisements, which indicate the connections between a particular routing system transmitting the link state advertisement and other router systems. The other router systems 120-125 receive these link state advertisements and store the advertisements in a database. The stored link state advertisements are then used to determine the path used to transmit data between any of the routers using OSPF protocol as is known in the art.

FIG. 2 shows a router 200. Router 200 is a switching system that transmits digital data, in the form of packets between processing systems connected to a network. One skilled in the art will recognize that router 200 may be a router, switch or any other processing system that receives and transmits digital data.

Router 200 includes ports 205-209. Ports 205-209 connect router 200 to other processing systems in a network. The other processing systems that may be connected include computers, other routers or any other digital processing systems. One skilled in the art will further recognize that ports 205-209 are shown for exemplary purposes only and the exact number and configuration of the ports are left to one skilled in the art designing a specific router.

Ports 205-209 are connected to switch circuitry 215. Switch circuitry 215 is circuitry that transmits received packets to the proper ports for delivery to the proper address. One skilled in the art will recognize that there are many different types of circuitry that may be used to transmit packets between proper ports and an explanation of the switching circuitry is not critical to this invention and is omitted for brevity.

Processing unit 220 is connected to switching circuitry 215. Processing unit 220 is a processor, microprocessor, or any combination of processors and microprocessors that execute instructions to perform applications for performing functions in router 200. Processing unit 220 is also connected to a volatile memory 225 and a non-volatile memory 230 via memory bus 235.

Volatile memory 225 is a memory such as a Random Access Memory (RAM). A volatile memory stores instructions and data used by processing unit 220 to perform applications. One such application is a router operating system. The routing operating system is applications which allow router 200 to perform other applications that provide the functions of router 200. An example of the router operating system is Inter-network Operating System (IOS) designed by Cisco Systems Inc. One skilled in the art will recognize that many different types of memory may be used by a non-volatile memory such SRAM and DRAM.

Non-volatile memory 230 is a memory such as a Read Only Memory (ROM). Non-volatile memory 230 stores configuration and other vital information for router 200. One skilled in the art will recognize that there are many different types of memory that may be used as a non-volatile memory.

Modules 240, 245, and 250 are connected to switching circuitry 215. Modules 240, 245, and 250 are device and/or software that prepare specific features in router 200. An example of a module is a Voice Over Internet Protocol (VoIP) module for providing telephonic communications to processing devices connected to router 200. One skilled in the art will recognize that the number of modules and the functions each module provides may be determined by one skilled in the art designing a particular router.

The present invention relates to a method and apparatus for generating a link state identifier for a link state advertisement being sent by a router system. In accordance with this invention, the link state identifier is a unique identifier for link state advertisements of a given type from a router system that performs a start-up while the network is operational. This reduces the need for each router system in the network to flush its database of link state advertisements from the router system performing the start-up in order to prevent disruption of communication between the router systems.

FIG. 3 illustrates process 300 that is a preferred exemplary embodiment for generating a link state advertisement with a link state identifier generated in accordance with this invention. Process 300 begins in step 305 with a link state advertisement being generated by the routing system. The link state advertisement is generated in compliance the OSPF protocol as is known in the art. In step 310, the router reads the prefix length contained in the generated link state advertisement. Preferably, the length is an integer value in a range between 0 and 128 indicating the network portion of the preceding Ipv6 address. One skilled in the art will recognize that the length may be determined in other manners and may not be restricted to Ipv6 addresses.

In step 315, a prefix is read from the generated link state advertisement. Preferably, the prefix is a 128-bit Ipv6 address being advertised in the advertisement which is contained in the link state advertisement. One skilled in the art will recognize that the prefix may be determined from other types of addresses and does not have to be used exclusively with Ipv6.

In step 320, a hash function is then performed on the length and the prefix. Preferably, the result of the hash function is no more than 32 bits. Also, the hash function should be chosen that generates minimal collision given different inputs. One skilled in the art will recognize that many such hash functions are described in the available art and an exact function is not given for brevity.

In an exemplary embodiment, the hash function is performed in the following manner. The prefix length is an integer represented by N. The Ipv6 network prefix is converted to a 128 bit binary integer by taking the first N bits of the prefix and appending 128-N zero bits to the end of the first N bits. The 8 bit binary representation of N is then appended to the previously determined 128 bit binary integer to generate a 136 bit binary integer. The 136 bit binary integer is then input to the well known SHA-1 hash algorithm, and the low-order 31 bits of the resulting value are used as the link state identifier.

In some embodiments, process 300 may proceed directly to step 340. However, in the preferred embodiment of process 300, the router system determines whether the hash function has generated a unique link state identifier in step 325. This may be done by comparing the identifier to stored link state identifiers maintained by the router system.

If the result of the hash function is not a unique link state identifier, process 300 may issue another link state identifier for the advertisement in step 330. In some embodiments, this may be done by using some reserved identifier outside the range of results for the hash functions. In still other embodiments, the new identifier may be determined by applying a second hash function to the prefix and length. The second hash function, in this case should produce results in a different range from the first hash function.

In an exemplary embodiment, a second hash function is performed in the following manner. For purposes of this example, the 31 bit link state identifier computed in step 320 is denoted as H. First, H+1 is computed using 32 bit 2s compliment arithmetic. Then, in the result, set the value of 2³¹ in the result to 1. Then repeat this process until a unique link state identifier is generated.

After step 325 or 330, the router system then inserts the unique result into the link state advertisement as the link state identifier in step 340. The link state advertisement is then transmitted in step 345 and process 300 ends.

It is envisioned that one skilled in the art can create a method and apparatus to generate a link state identifier for a link state advertisement from above description of a preferred exemplary embodiment that infringe on this invention as set forth in the following claims either literally or through the Doctrine of Equivalents. 

1. A method comprising: generating a link state advertisement; reading a first value from the link state advertisement; reading a second value from the link state advertisement; combining the first value and the second value to create a combined value; inputting the combined value to a hash algorithm executed by a processing unit, which performs a hash function on the combined value to produce a resulting value; and using at least a portion of the resulting value as a link state identifier of the link state advertisement.
 2. The method of claim 1, further comprising: determining whether the at least a portion of the resulting value is a unique link state identifier; and in response to the at least a portion of the resulting value not being a unique link state identifier, updating the at least a portion of the resulting value.
 3. The method of claim 2, wherein the determining further comprises: comparing the at least a portion of the resulting value to a plurality of stored link state identifiers.
 4. The method of claim 2, wherein the updating further comprises: performing a second hash function on the combined value and replacing the at least a portion of the resulting value based on results of the second hash function.
 5. The method of claim 2, wherein the updating further comprises: changing the at least a portion of the resulting value to be outside of a range of results of the hash function.
 6. The method of claim 1, wherein the second value is a N-bit integer, and wherein the combining further comprises: taking the first N bits of a binary representation of the prefix and appending one or more zero bits to the first N bits.
 7. The method of claim 6, wherein the combining further comprises: appending a binary representation of the N-bit integer to the first N bits and one or more zero bits.
 8. The method of claim 1, wherein the using further comprises: inserting the link state identifier into the link state advertisement; and transmitting the link state advertisement over a network.
 9. The method of claim 1, wherein the first value is a prefix and the second value is a prefix length.
 10. The method of claim 9, wherein the prefix is a 128-bit Internet Protocol version 6 (Ipv6) address, the prefix length is an integer value in a range between 0 and 128 indicating a network portion of the Ipv6 address, and the link state advertisement is a Open Shortest Path First (OSPF) link state advertisement.
 11. The method of claim 1, wherein the combined value has a binary representation that has a first number of bits, and the link state identifier has a binary representation that has a second number of bits, wherein the first number of bits is greater than the second number of bits.
 12. The method of claim 1, wherein the processing unit is a processing unit of a routing system that includes one or more ports and one or more memories, and the generating, reading a first value, reading a second value, combining, inputing and using are performed by the routing system.
 13. Software encoded on one or more computer readable media and when executed operable to: generate a link state advertisement; read one or more values from the link state advertisement; perform a hash function on the one or more values to produce a resulting value; use at least a portion of the resulting value as a link state identifier of the link state advertisement; insert the link state identifier into the link state advertisement; and transmit the link state advertisement over a network.
 14. The software of claim 13 when executed further operable to: compare the at least a portion of the resulting value to a plurality of stored link state identifiers to determine whether the at least a portion of the resulting value is a unique link state identifier; and in response to the at least a portion of the resulting value not being a unique link state identifier, update the at least a portion of the resulting value.
 15. An apparatus comprising: one or more ports; a processing unit; and a memory configured to store instructions for generating a link state advertisement, the instructions when executed by the processing unit operable to: determine a first value of the link state advertisement, determine a second value of the link state advertisement, combine the first value and the second value to create a combined value, perform a hash function on the combined value to produce a resulting value, and use at least a portion of the resulting value as a link state identifier of the link state advertisement.
 16. The apparatus of claim 15, wherein the instructions further comprise instructions that when executed by the processing unit are operable to: determine whether the at least a portion of the resulting value is a unique link state identifier, and in response to the at least a portion of the resulting value not being a unique link state identifier, updating the at least a portion of the resulting value.
 17. The apparatus of claim 16, wherein the instructions further comprise instructions that when executed by the processing unit are operable to: compare the at least a portion of the resulting value to a plurality of stored link state identifiers.
 18. The apparatus of claim 16, wherein the instructions operable to update further comprise instructions that when executed by the processing unit are operable to: perform a second hash function on the combined value and replace the at least a portion of the resulting value based on results of the second hash function.
 19. The apparatus of claim 16, wherein the instructions operable to update further comprise instructions that when executed by the processing unit are operable to: change the at least a portion of the resulting value to be outside of a range of results of the hash function.
 20. The apparatus of claim 15, wherein the first value is a prefix and the second value is a prefix length. 